برچسب:
نویسنده: دانیال باقری
برچسب:
نویسنده: دانیال باقری
Previous PageNext Page The easiest way to make a progress circle is using through a class called ProgressDialog. The loading bar can also be made through that class. The only logical difference between bar and circle is , that the former is used when you know the total time for waiting for a particular task whereas the later is used when you don't know the waiting time.In order to this , you need to instantiate an object of this class. Its syntax is.ProgressDialog progress = new ProgressDialog(this);
Now you can set some properties of this dialog. Such as, its style,its text e.t.cprogress.setMessage("Downloading Music :) ");
progress.setProgressStyle(ProgressDialog.STYLE_SPINNER);
progress.setIndeterminate(true);
Apart from these methods, there are other methods that are provided by the ProgressDialog class.Sr.NoClasses & Description1getMax()This methods retus the maximum value of the progress2incrementProgressBy(int diff)This method increment the progress bar by the difference of value passed as a parameter3setIndeterminate(boolean indeterminate)This method set the progress indicator as determinate or indeterminate4setMax(int max)This method set the maximum value of the progress dialog5setProgress(int value)This method is used to update the progress dialog with some specific value6show(Context context, CharSequence title, CharSequence message)This is a static method, used to display progress dialogExampleThis example demonstrates the spiing use of the progress di
برچسب:
نویسنده: دانیال باقری